package com.cskaoyan.javase.basic._8control._1continue;

/**
 * @description: continue关键字
 * @author: wuguidong@cskaoyan.onaliyun.com
 **/

/**
 * continue是继续的意思
 * continue的使用场景:
 *      仅能够在循环中使用,表示跳过当前层次当前次循环
 *
 *
 */
public class Demo {
    public static void main(String[] args) {
        for (int i = 0; i < 5; i++) {
            if (i == 3) continue;
            System.out.println("我很喜欢你~");
        }
        System.out.println("hello world!");

        label:
        for (int i = 0; i < 5; i++) {
            label2:
            for (int j = 0; j < 3; j++) {
                if (j == 1) continue label;
                System.out.print("?");
            }
            System.out.println();
        }
    }
}
